<?php
namespace app\web\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class HandCardAdvance extends Validate
{
    //定义验证规则
    protected $rule = [
        'viper_card_id|会员卡ID'  => 'require',
        'passwd|密码'  => 'require',
        'money|金额'  => 'require',
        'hand_card_id|手牌'  => 'require',
        'hand_card_name|手牌' =>'require',
    ];
    //定义验证提示
    protected $message = [
        'viper_card_id.require' => '会员卡必须填写',
        'passwd.require' => '请填写密码',
        'money.require' => '请填写金额',
        'hand_card_id.require' => '请选择手牌',
        'hand_card_name.require' => '请选择手牌',
    ];
    //定义验证场景
    protected $scene = [
        'add'   =>  ['viper_card_id','passwd','money','hand_card_id','hand_card_name'],
    ];
}
